package p270jp.pxv.android.viewholder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import p134ei.AnalyticsAction;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p270jp.pxv.android.model.AppApiSketchLive;
import p314lg.ViewHolderLiveBinding;
import p325m0.MutabilityOwnership;
import p677zi.PixivImageLoader;

/* compiled from: LiveViewHolder.kt */
/* renamed from: jp.pxv.android.viewholder.LiveViewHolder */
/* loaded from: classes2.dex */
public final class LiveViewHolder extends RecyclerView.AbstractC0819y {
    private final ViewHolderLiveBinding binding;
    private final PixivImageLoader pixivImageLoader;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: LiveViewHolder.kt */
    /* renamed from: jp.pxv.android.viewholder.LiveViewHolder$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final LiveViewHolder createViewHolder(ViewGroup viewGroup, PixivImageLoader aVar) {
            MutabilityOwnership.m3745m(viewGroup, "parent");
            MutabilityOwnership.m3745m(aVar, "pixivImageLoader");
            ViewHolderLiveBinding u6Var = (ViewHolderLiveBinding) DataBindingUtil.m11370c(LayoutInflater.from(viewGroup.getContext()), R.layout.view_holder_live, viewGroup, false);
            MutabilityOwnership.m3746l(u6Var, "binding");
            return new LiveViewHolder(u6Var, aVar, null);
        }
    }

    private LiveViewHolder(ViewHolderLiveBinding u6Var, PixivImageLoader aVar) {
        super(u6Var.f2666e);
        this.binding = u6Var;
        this.pixivImageLoader = aVar;
    }

    public /* synthetic */ LiveViewHolder(ViewHolderLiveBinding u6Var, PixivImageLoader aVar, DefaultConstructorMarker eVar) {
        this(u6Var, aVar);
    }

    public final ViewHolderLiveBinding getBinding() {
        return this.binding;
    }

    public final void setLive(AppApiSketchLive appApiSketchLive, int i, int i2, AnalyticsAction aVar) {
        MutabilityOwnership.m3745m(appApiSketchLive, "live");
        MutabilityOwnership.m3745m(aVar, "openViaAction");
        this.binding.f22316q.m4489c(appApiSketchLive, aVar);
        this.binding.f22316q.setFullInternalTitleVisibility(0);
        this.binding.f22316q.setLayoutParams(new ViewGroup.LayoutParams(i, i2));
        ImageView imageView = this.binding.f22316q.getBinding().f22355s;
        MutabilityOwnership.m3746l(imageView, "binding.liveModuleView.binding.mainImageView");
        PixivImageLoader aVar2 = this.pixivImageLoader;
        Context context = imageView.getContext();
        MutabilityOwnership.m3746l(context, "imageView.context");
        aVar2.m54l(context, appApiSketchLive.thumbnailImageUrl, i, i2, imageView, 15);
        this.binding.m11392i();
    }
}
